package com.ic.loan.activity

import android.os.Bundle
import android.os.PersistableBundle
import androidx.appcompat.app.AppCompatActivity
import com.gyf.immersionbar.ImmersionBar
import com.lxj.xpopup.XPopup
import com.lxj.xpopup.impl.LoadingPopupView

open class BaseActivity : AppCompatActivity() {
    private var loadingView: LoadingPopupView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        ImmersionBar.with(this)
            .fitsSystemWindows(false)  //透明状态栏，不写默认透明色
            .init()
        super.onCreate(savedInstanceState)
        loadingView = XPopup.Builder(this).asLoading()
    }


    fun showLoading(){
        loadingView?.show()
    }

    fun hintLoading(){
        loadingView?.dismiss()
    }
}
